Draft
Conversation
Collaborator
|
@asmyasnikov appreciate the effort here! Right now supporting the three existing database engines is challenging enough. I have some longer term plans on making that easy, but in the meantime, I'm not going to merge support for YDB. I'd encourage you to maintain this as a fork until things are in a place where supporting custom engines is easier. |
Author
|
@kyleconroy What do you think of using an external database engine as a plugin, similar to a database/sql or GORM (for example using "_" import for register engine)? |
… integration - Added reserved keywords and parsing logic - CREATE TABLE support and tests - SELECT initial support and tests - Initial YDB engine integration and examples
USE ... PRAGMA CREATE USER CREATE GROUP COMMIT RESTORE also added some new tests and debugged old code for mistakes
This PR adds native YDB Go SDK support to sqlc for YDB database engine, moving from the standard database/sql interface to the YDB-specific SDK. The implementation includes code generation templates, configuration updates, and example adaptations. Adds YDB Go SDK as a new SQL package option (ydb-go-sdk) Implements YDB-specific code generation templates for queries, interfaces, and database connections Updates configuration schema to support YDB as an engine option
…rted DISTINCT, HAVING, GROUP BY, ORDER BY, LIMIT, OFFSET, UNION), added ALTER TABLE, DO stmt) (#10) * Added ALTER TABLE support * Added DO stmt support * Fixed DO stmt generation * Refactored SELECT logic. Supported DISTINCT, HAVING, GROUP BY, ORDER BY, LIMIT, OFFSET, UNION * Fixed style and types * Refactored DO stmt style & added some additional converts --------- Co-authored-by: Viktor Pentyukhov <nepunep@172.28.98.114-red.dhcp.yndx.net>
* Made new params building logic & got rid off .Query handle (replaced it with QueryResultSet) * Cosmetics * Bug fixes --------- Co-authored-by: Viktor Pentyukhov <nepunep@172.28.98.114-red.dhcp.yndx.net>
…casts & error texts (#12) * Rewrited ydb convert to Visitor Interface + validated type casts and error texts
* Massive Functions update * Fixed ydb_type nullable problem and added new funcs to ydb catalog * Update internal/engine/ydb/convert.go * Removed comment from query.go to extractBaseType method
* Added Arrays support + rewrites some internal logic to handle sqlc.arg/narg/slice in ydb
* Supported containertype named parameters
* Rewrited params to handle compex types and comment if type is interface{}
* Fixed range result.Rows(ctx) issue (go<1.23) * Rewrited strings to BYTES ([]byte) * Fixed count(*) issue * Fixed datatype test * fixed uuid issue * rewrited ydb-go-sdk codegen to ranges back (+ upped testada go.mod version to 1.23) * rewrited parseStringLiteral func to be more understandable * resolved limit issue * Rewrited slices logic not replace them
* Added docs and rewrited examples for ydb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.